#include<stdio.h>
double factorial(double n);
int main()
{   double number;
    double sub;
	scanf("%lf",&number);
	sub=factorial(number);
	printf("%lf",sub);
	return 0;
}
double factorial(double n)
{
	double i,s=1;
	double m;
	for(i=1;i<=n;i++)
	{s=s*i;} 
	m=1/s;
	if(n>1)
	return m+factorial(n-1);
	else 
	return 1.0; 
}
